function login(){
 
	if($.trim($('#username').val())==''){
		swal("请输入用户名", "", "error");
	}else{
	    $.ajax({
			type : 'POST',
			dataType:'json', 
			url : ctp + '/interface/userLogin',
			data: {
				user_name_out:$.trim($('#username').val())
			},
			success:function(data){
				if(data.code==200){
					window.self.location = "web/index.jsp"; 
				}else{
					swal(data.msg, "", "error");
				}
			},
			error:function(data){
				//art.dialog("获取数据出现异常", function(){});
			}
	    });
	}

}